package com.normalsys.live.dao;

import com.normalsys.live.base.mapper.MsMapper;
import com.normalsys.live.entity.UserForm;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserFormDAO extends MsMapper<UserForm> {

    @Select("select form_id from tb_user_form where openid=#{openid} and expire_time> #{now} order by expire_time asc limit 1")
    @ResultType(String.class)
    String getFormId(@Param("openid") String openid, @Param("now") String now);

}
